
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt


train_csv_path   = "../image_true_label_train.csv"



if __name__ == "__main__":

    #----------------------#
    #   读取数据集对应的csv
    #----------------------#
    train_csv = pd.read_csv(train_csv_path)
    feature = train_csv.columns
    train_data = np.array(train_csv)

    time_length, feature_number = train_data.shape
    font_size = 24
    index = 4

    from matplotlib import rcParams
    fontconfig = {
        "font.family": 'Times New Roman',  # 设置字体类型
    }

    rcParams.update(fontconfig)
    plt.figure(figsize=(14, 7))
    plt.stairs(train_data[:, index], label=feature[index])
    plt.xlabel("frame sample number", fontsize=font_size + 2)
    plt.ylabel(feature[index], fontsize=font_size + 2)
    plt.yticks([0, 1, 2, 3],
    ['none', 'alwayslight', 'weakmainfire', 'strongmainfire'], fontsize=font_size, rotation=60)
    plt.tick_params(labelsize=font_size)
    plt.tight_layout()
    plt.show()


